Magnetic sensors are used to provide absolute azimuth reference in electronic compassing and motion sensor fusion systems. Specifically, in motion sensor fusion systems, the magnetic sensors can be used for the dual purposes of providing the azimuth reference as well as to provide gyroscope bias and scale error corrections. The inherent advantages of a magnetic sensor are that it is non-inertial and can therefore respond instantaneously to motions without overshoot, or errors caused by linear or angular accelerations. However, their disadvantage is that they are easily perturbed by magnetic distortions from both within a device's frame as well as external to it.
Magnetic distortions within a device's frame consist of hard-iron and soft-iron distortions. Hard-iron distortions are offsets to the magnetic measurements while soft-iron distortions change the gains and phases of the magnetic measurements as a function of rotation of the device within the measurement environment. It is necessary to compute both hard-iron and soft-iron distortions and correct for them in order to measure the magnetic field external to the device accurately so that the measured magnetic field vector can be suitably used in either electronic compassing or motion sensor fusion systems. However, hard-iron and soft-iron distortions change frequently over time and with device configuration changes. Such changes contribute to large errors in electronic compassing and motion sensor fusion systems, and need to be rapidly and automatically corrected as they occur. This necessitates a method to automatically calibrate for changing distortions, and more ideally, done so as a background process of the device during normal usage so that no pre-determined calibration procedure is necessary, thus not causing any discontinuity of accuracy or reliability during use. Such an automated calibration method is challenging to implement properly in most typical magnetic environments due to additional external distortions such as magnetic gradients and anomalies. Automatic calibration methods that currently exist will change their hard-iron and soft-iron coefficient calculations when externally generated distortions are presented to the device, thus often causing significant and unpredictable inaccuracies. The present invention teaches a method to accurately compute a device's hard-iron and soft-iron correction coefficients while properly rejecting magnetic distortions external to the device that would normally cause the inaccurate computations of these coefficients while running continuously as an automated background process.
It is desirable to have apparatuses, methods, and systems for automatically updating hard-iron and soft-iron coefficients of a magnetic sensor.